let head_a = document.querySelectorAll(".banzhong a");
let navbz_a = document.querySelectorAll(".navbz >a");
let hdzx= document.querySelector(".hdzx")
let hdzxlb=document.querySelector(".hdzxlb")
for(let i = 0;i<head_a.length;i++){
        head_a[i].onmouseover=function(){
    head_a[i].style.color="red";
    head_a[i].style.textDecoration = "underline";
    // console.log("1")
     };
    head_a[i].onmouseout=function(){
    head_a[i].style.color="#666";
    head_a[i].style.textDecoration = "none";
    
   }

};

for(let i = 1;i<navbz_a.length;i++){
    navbz_a[i].onmouseover=function(){
navbz_a[i].style.backgroundColor="#f74a4a";
navbz_a[i].style.borderBottom="5px solid #ce3535";
// console.log("1")
 };
navbz_a[i].onmouseout=function(){
    navbz_a[i].style.backgroundColor="transparent";
    
    navbz_a[i].style.borderBottom="none";

}

}
hdzx.onmouseover=function(){
    hdzx.style.backgroundColor="#f74a4a";
hdzx.style.borderBottom="5px solid #ce3535";
     hdzxlb.style.display="block";
};
hdzx.onmouseout=function(){
    hdzx.style.backgroundColor="transparent";
    
    hdzx.style.borderBottom="none";
    hdzxlb.style.display="none";
};


// banner左边的二级菜单
 let s1 = document.querySelector(".s1");
 let s2 = document.querySelector(".s2");
 let s3 = document.querySelector(".s3");
 let s4 = document.querySelector(".s4");
 let s5 = document.querySelector(".s5");

 let bzlb1 = document.querySelector(".bzlb1");
 let bzlb2 = document.querySelector(".bzlb2");
 let bzlb3 = document.querySelector(".bzlb3");
 let bzlb4 = document.querySelector(".bzlb4");
 let bzlb5 = document.querySelector(".bzlb5");

function lb (s,b){
    s.onmouseover=function(){
 s.style.backgroundColor="#fff";
 s.style.color="#000";
 b.style.display="block"
}
s.onmouseout=function(){
    s.style.backgroundColor="#f55656";
    s.style.color="#fff";
    b.style.display="none"
   }
b.onmouseover=function(){
    b.style.display="block"
    s.style.backgroundColor="#fff";
    s.style.color="#000";
}
b.onmouseout=function(){
    s.style.backgroundColor="#f55656";
    s.style.color="#fff";
    b.style.display="none"
   }

}
lb(s1,bzlb1)
lb(s2,bzlb2)
lb(s3,bzlb3)
lb(s4,bzlb4)
lb(s5,bzlb5)

